<template>
  <div>
    <el-form :inline="true" :model="queryList" class="demo-form-inline" size="small">
      <el-form-item label="讲师姓名">
        <el-input v-model="queryList.name" placeholder="请输入姓名"></el-input>
      </el-form-item>
      <el-form-item label="讲师头衔">
        <el-select v-model="queryList.level" placeholder="请选择头衔">
          <el-option label="高级讲师" value="0"></el-option>
          <el-option label="首席讲师" value="1"></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="注册时间">
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择起始日期" v-model="queryList.begin" style="width: 100%;"></el-date-picker>
        </el-col>
        <el-col class="line" :span="1">---</el-col>
        <el-col :span="11">
          <el-date-picker type="date" placeholder="选择结束日期" v-model="queryList.end" style="width: 100%;"></el-date-picker>
        </el-col>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">查询</el-button>
        <el-button type="default" @click="resetData">清空</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  export default {
    name: "QueryLine",
    props:{},
    data() {
      return {
        queryList: {
          name: '', //姓名
          level: '', //头衔
          dept: '', //部门
          begin: '',  //起始时间
          end: '',  //结束时间
        }
      }
    },
    methods: {
      onSubmit() {
        this.$emit('getTeacherList',this.queryList)
      },
      resetData(){
        this.queryList = {}
        this.$emit('getTeacherList',this.queryList)
      }
    }
  }
</script>

<style scoped>

</style>
